﻿Public Class AltaCliente

    Private Sub AltaCliente_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.MdiParent = Principal

        Dim configuracion As New Configuracion()


    End Sub

    Private Sub buttonCrearCliente_Click(sender As Object, e As EventArgs) Handles buttonCrearCliente.Click
        Dim bd As BD = Principal.Bd()
        Dim MiCliente As Cliente
        Dim whatssapp As Boolean
        If (radioButtonSi.Checked) Then
            whatssapp = True
        Else
            whatssapp = False
        End If

        MiCliente = New Cliente(textBoxDNI.Text, textBoxNombre.Text, textBoxTelefono.Text, textBoxEmail.Text, whatssapp, textBoxFacebook.Text, textBoxTwitter.Text)
        If (bd.InsertarCliente(MiCliente)) Then
            MessageBox.Show("Cliente insertado corretamente")
        End If




    End Sub
End Class